package net.bithappens.hnqe.scratchpad;

import net.bithappens.hnqe.impl.cache.schema.SchemaContainer;
import net.bithappens.hnqe.impl.cache.schema.SchemaLoader;

public class TestSchemaLoader {

	
	public static void main(String[] args) throws Exception {
		
		
//		SchemaLoader schemaLoader = new SchemaLoader("C:\\Users\\Armin\\workspace\\HyperNetworkQueryEngine\\GraphDefinitions");
		
		SchemaLoader schemaLoader = new SchemaLoader("I:\\Armin\\JAVAProjects\\HyperNetworkQueryEngine\\GraphDefinitions");
		
		SchemaContainer schemaContainer = schemaLoader.loadSchemaData();
		
//		RDFQueryBuilder queryBuilder = new RDFQueryBuilder("testcom", schemaContainer);
//				
//		Atom var_X = Atom.getNodeVariable("X");
//		Atom var_name_x = Atom.getValueVariable("xname");
//		
//		Atom var_Y = Atom.getNodeVariable("Y");
//		Atom var_name_y = Atom.getValueVariable("yname");
//		
//		Predicate pred_name_X = new Predicate("name", var_X, var_name_x);
//		Predicate pred_X_nameIsLike = new Predicate("@regEx", var_name_x, Atom.getValueConstant("andy gruber"));
//		Predicate pred_wrotePost = new Predicate("wrotePost", var_X, var_Y);
//		Predicate pred_name_Y = new Predicate("name", var_Y, var_name_y);
//		Predicate pred_Y_nameIsLike = new Predicate("@regEx", var_name_y, Atom.getValueConstant("colours of the"));
//		
//		QueryObject query = Operation.AND(pred_name_X, pred_X_nameIsLike, pred_wrotePost, pred_name_Y, pred_Y_nameIsLike);
//	
//		queryBuilder.createQuery(query);
		
		
		
//		RDFCacheManager manager = new RDFCacheManager();
//		
//		
//		List<GraphNode> nodes = new ArrayList<GraphNode>();
//		
//		GraphNode gNode = new GraphNode("person", new URI("http://sampleURI.com"), null);
//		gNode.addProperty(new GraphProperty("name", new GraphValue("basdfads")));
//		gNode.addProperty(new GraphProperty("type", new GraphValue("basdfads")));
//		
//		nodes.add(gNode);
//		
//		manager.createNodes("testcom", nodes , new OperationInstructions(false, false));
//		
		
		
//		RDFCacheManager manager = new RDFCacheManager();
		
//		manager.queryCache("testcom", query);
		
				
	}
	
}
